<!--
+----------------------------------------------------------------------
| 友得云客  - 开启房产营销新纪元
+----------------------------------------------------------------------
| Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
+----------------------------------------------------------------------
| Licensed 友得云客不是自由软件 未经允许不可移除相关版权
+----------------------------------------------------------------------
| Author: www.youdeyunke.com
+----------------------------------------------------------------------
-->
<template>
    <div v-loading="loading">
      <el-form v-loading="loading" label-position="right" label-width="150px" >
        <el-form-item label="选择要跳转的页面">
            <el-select filterable v-model="currentPath" placeholder="请选择页面">
                <el-option v-for="(path, index) in paths" :key="index" :label="path.name" :value="path.value" />
            </el-select>
        </el-form-item>

        <el-form-item label="页面跳转路径">
            <el-input id="currentPath" v-model="currentPath" style="width: 500px">
                <el-button :disabled="!currentPath" slot="append" icon="el-icon-document-copy"
                    v-clipboard:success="() => $message.success('已复制')" v-clipboard:error="() => $message.error('复制失败')"
                    v-clipboard:copy="currentPath">复制</el-button>
            </el-input>
        </el-form-item>

        <el-form-item label>
            <el-link target="_blank"
                href="https://jingyan.baidu.com/article/86112f13bd1ded27379787ae.html">公众号打开小程序设置教程</el-link>
        </el-form-item>
        </el-form>
    </div>
</template>

<script>
import { updateMapInfo } from "@/api/myconfig";
import { getPathList } from "@/api/weapp";
export default {
    name: 'sysinfo',
    props: {
        config: { type: Object, default: null },
    },
    watch: {

    },
    mounted() {
        this.loadPaths()
    },
    data() {
        return {
            currentPath: "",
            paths: [],
            loading: false,
        }
    },

    methods: {
        loadPaths: function () {
            getPathList().then((resp) => {
                this.paths = resp.data;
            });
        },
    },

}
</script>

<style></style>
